package net.lab1024.sa.admin.module.sast.tool.controller;


import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.websocket.server.PathParam;
import net.lab1024.sa.admin.module.sast.tool.domain.ToolConfigEntity;
import net.lab1024.sa.admin.module.sast.tool.service.ToolConfigService;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/toolConf")
@Tag(name = "工具配置管理")
public class ToolConfigController {


    @Resource
    private ToolConfigService toolConfigService;

    @Operation(summary = "通过工具UUID查询工具配置")
    @GetMapping("/query/{uuid}")
    public ResponseDTO<ToolConfigEntity> getByUuid(@PathVariable("uuid") String uuid) {
        return ResponseDTO.ok(toolConfigService.getByUuid(uuid));
    }

}
